package com.study.ksugb.sample.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.study.ksugb.sample.dao.SampleDao;
import com.study.ksugb.sample.service.SampleService;

@Service
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class SampleServiceImpl implements SampleService {

	@Autowired
	private SampleDao sampleDao;

	// dbTest
	public String getDbTest(String myName) throws Exception {

		String response = "당신의 userId는 '" + sampleDao.getDbTest(myName) + "' 입니다.";

		return response;
	}

}